<%@ page language="java" import="java.util.*,zhjb.platform.module.schedule.bean.*" pageEncoding="UTF-8"%>
<%
String title="";
String tx="0";
String message=request.getAttribute("message")==null?"":request.getAttribute("message").toString();
ScheduleTask task=request.getAttribute("task")==null?null:(ScheduleTask)request.getAttribute("task");
if(task!=null){
	title=task.getTitle();
	tx=task.getRemindType();
}

%>
<jsp:include page="/include/nocache.jsp"></jsp:include>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  </head>
  
  <body>
  	<form action="${pageContext.request.contextPath}/schedule/addtask.zhtml" method="post" id="frm" onsubmit="return false;">
  	<table width="100%" border="1">
  		<tr>
  			<td colspan="2">
				<textarea name="task.title" style="width:100%;height:200px;font-size:20px"><%=title %></textarea>
  			</td>
  		</tr> 
  		<tr>
  			<td width="100"><font size="12">开始</font></td>
  			<td><input type="date" name="task.start" width="100%"/></td>
  		</tr> 
  		<tr>
  			<td width="100"><font size="12">结束</font></td>
  			<td><input type="date" name="task.end" width="100%"/></td> 
  		</tr> 
  		<tr>
  			<td width="100"><font size="12">提醒</font></td>
  			<td width="*%">
  				<select style="width:100%;" name="task.remindType">
  					<option value="0" <%="0".equals(tx)?"selected":"" %>>否</option>
  					<option value="1" <%="1".equals(tx)?"selected":"" %>>是</option>
  				</select>
  			</td>
  		</tr>
  		<tr>
  			<td colspan="2" align="center"> 
  				<button style="width:45%;height:100px" onclick="submitData()">
  					<font size="12">保存</font>
  				</button> 
  				&nbsp;
  				<button style="width:45%;height:100px" onclick="backIndex()">
  					<font size="12">返回</font>
  				</button> 
  			</td>
  		</tr>  
  	</table>  
  	</form>
  	<script>
  		function submitData(){
			document.getElementById("frm").submit();
  	  	}
  	  	
  		function backIndex(){
  	  		window.location="${pageContext.request.contextPath}/schedule/index.zhtml";
  	  	}

  	  	if("<%=message%>"!=""){
			alert("<%=message%>");
  	  	}
  	</script>
  </body>
</html>